<?php

namespace Utils;

class ResponseManager
{
    public static $response = array('flag' => true, 'message' => '', 'data' => '', 'code' => '');
    
    public static function getResult($data, $message)
    {
        self::$response['flag'] = true;
        self::$response['message'] = $message;
        self::$response['data'] = $data;

        return self::$response;
    }

    public static function getError($data='',$code, $message)
    {
        self::$response['flag'] = false;
        self::$response['message'] = $message;
        self::$response['code'] = $code;      
        self::$response['data'] = $data;

        return self::$response;
    }
}